package com.server.common.code.utils;

import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil;
import cn.hutool.http.HttpUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class HttpUtils extends HttpUtil {

    /**
     * map转get参数
     * @author LXC
     * @date 2022/6/16 22:02
     */
    public static String mapToGetParam(Map<String,Object> map){
        List<String> paramList = new ArrayList<>();
        map.forEach((key, value) -> paramList.add(key + "=" + value));
        return StrUtil.join("&",paramList);
    }

}
